package com.hsgene.shoppingcar.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.hsgene.common.util.date.TimeJsonDeserializer;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 购物车信息
 *
 * @Author: wangxuefeng@hsgene.com
 * @Description:
 * @Date: Created in 15:35 2018/7/16
 * @Modified By:
 */
@Table(name = "geneshop_shopping_car")
public class ShoppingCarInfo implements Serializable {

    /**
     * id
     */
    @Id
    private String id;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 商品id
     */
    private String goodId;

    /**
     * 商品数量
     */
    private int goodCount;

    private boolean selected;
    /**
     * 创建时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date createTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getGoodId() {
        return goodId;
    }

    public void setGoodId(String goodId) {
        this.goodId = goodId;
    }

    public int getGoodCount() {
        return goodCount;
    }

    public void setGoodCount(int goodCount) {
        this.goodCount = goodCount;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }
}
